package com.zm.modules.system.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zm.modules.system.entity.SysUser;
import com.zm.modules.system.mapper.SysUserMapper;
import com.zm.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @ ClassName SysUserServiceImpl
 * <p> 用户服务实现
 * @ author 王志明
 * @ Date 2020/11/12 10:00
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    @Autowired
    private SysUserMapper userMapper;
    public Page<SysUser> selectUserPage(Page<SysUser> page, String state) {
        page.setRecords(userMapper.selectUserList(page,state));
        return page;
    }

    @Override
    public Page<SysUser> listSelectUserPage() {
        Page<SysUser> page = new Page<>();
        page.setRecords(userMapper.listSelectUserPage(null));
        return page;
    }
}
